@extends('app')
@include('UEditor::head')
@section('content')
<h4 class="page-header">网站基本信息</h4>
<div class="description2">
    <form action="{{ url('admin/content/info') }}" method="post">
      <table class="table table-striped">
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-2 col-xs-3 control-label">网站名称:</span>
                  <div class="col-sm-5 col-xs-8">
                      <input type="text" name="site_name" class="form-control" value="{{ $result['site_name'] }}">
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-2 col-xs-3 control-label">关键字:</span>
                  <div class="col-sm-5 col-xs-8">
                      <input type="text" name="keywords" class="form-control" value="{{ $result['keywords'] }}">
                      <div class="help-block" >关键字，seo搜索时会用到，以","分割</div>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-2 col-xs-3 control-label">描述:</span>
                  <div class="col-sm-5 col-xs-8">
                      <textarea name="description" rows="5" class="form-control textarea" >{{ trim($result['description']) }}</textarea>
                      <div class="help-block" >网站描述，SEO搜索会用到</div>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                   <span class="col-sm-2 col-xs-3 control-label">ICP备案号</span>
                   <div class="col-sm-5 col-xs-8">
                      <input type="text" name="icp_beian" class="form-control" value="{{ $result['icp_beian'] }}"> 
                   </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-2 col-xs-3 control-label">后台登陆验证码:</span>
                  <div class="col-sm-5 col-xs-8">
                      <label class="radio-inline">
                        <input type="radio" name="admin_login_seccode" value="Y" @if($result['admin_login_seccode'] == 'Y') checked @endif> 启用
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="admin_login_seccode" value="N" @if($result['admin_login_seccode'] == 'N') checked @endif> 关闭
                      </label>
                  </div>
                  <div class="clear"></div>  
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                  <span class="col-sm-2 col-xs-3 control-label">网站敏感词:</span>
                  <div class="col-sm-5 col-xs-8">
                      <textarea name="sensitive_words" rows="5" class="form-control textarea" >{{ trim($result['sensitive_words']) }}</textarea>
                      <div class="help-block">网站敏感词过滤，多个以","号隔开</div>
                  </div>
                </div>
            </td>
        </tr>
        <tr>
              <td>
                  <div class="form-group">
                      <span class="col-sm-2 col-xs-3 control-label">关于我们:</span>
                      <div class="col-sm-9 col-xs-9">
                         <script id="about" name="about"  style="width:100%;margin:0 auto;height:200px;" type="text/plain">
                         </script>
                      </div>
                  </div>
              </td>
        </tr>
        <tr>
              <td>
                  <div class="form-group">
                      <span class="col-sm-2 col-xs-3 control-label">合作加盟:</span>
                      <div class="col-sm-9 col-xs-9">
                          <script id="join" name="join"  style="width:100%;margin:0 auto;height:200px;" type="text/plain">
                          </script>
                      </div>
                  </div>
              </td>
        </tr>
        <tr>
              <td>
                  <div class="form-group">
                      <span class="col-sm-2 col-xs-3 control-label">联系我们:</span>
                      <div class="col-sm-9 col-xs-9">
                          <script id="contact" name="contact"  style="width:100%;margin:0 auto;height:200px;" type="text/plain">
                          </script>
                      </div>
                  </div>
              </td>
        </tr>
      </table>
        {!! csrf_field() !!}
        <div class="form-inline mt20">
            <div class="form-group">
              <input type="hidden" name="stauts" value="1">
              <input type="submit" class="btn btn-primary btn-block" id="save" value="保存" />
            </div>
            <div class="form-group ml30">
                <input type="reset" class="btn btn-default btn-block" value="重置" />
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    var ue = UE.getEditor('about');
    ue.ready(function() {
        ue.execCommand('serverparam', '_token', '{{ csrf_token() }}');//此处为支持laravel5 csrf ,根据实际情况修改,目的就是设置 _token 值.
        ue.setContent('@if(!empty($result))  {!! $result["about"] !!} @endif');
    });
    var ue1 = UE.getEditor('join');
    ue1.ready(function() {
        ue1.execCommand('serverparam', '_token', '{{ csrf_token() }}');//此处为支持laravel5 csrf ,根据实际情况修改,目的就是设置 _token 值.
        ue1.setContent('@if(!empty($result))  {!! $result["join"] !!} @endif');
    });
    var ue2 = UE.getEditor('contact');
    ue2.ready(function() {
        ue2.execCommand('serverparam', '_token', '{{ csrf_token() }}');//此处为支持laravel5 csrf ,根据实际情况修改,目的就是设置 _token 值.
        ue2.setContent('@if(!empty($result))  {!! $result["contact"] !!} @endif');
    });
</script>

@endsection
